package mal.carbonization;

import java.util.List;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

public class ItemIngots extends Item {

	public ItemIngots(int par1) {
		super(par1);
		this.hasSubtypes = true;
		this.setMaxDamage(0);
		this.setTextureFile(getTexture());
		this.setCreativeTab(CreativeTabs.tabMaterials);
	}
	
	public String getTexture()
	{
		return "/mal/carbonization/carbonizationTexture.png";
	}

	public int getIconFromDamage(int par1)
	{
		switch (par1)
		{
		case 0:
			return 9;
		case 1:
			return 10;
		case 2:
			return 11;
		case 3:
			return 12;
		default:
			return 0;
		}
	}
	
	public String getItemNameIS(ItemStack par1ItemStack)
	{
		String r="";
		
		switch (par1ItemStack.getItemDamage())
		{
		case 0:
			r="carbonization.refinediron";
			break;
		case 1:
			r="carbonization.pigiron";
			break;
		case 2:
			r="carbonization.mildsteel";
			break;
		case 3:
			r="carbonization.steel";
			break;
		default:
			r="carbonization.peat";
			break;
		}
		
		return r;
	}
	
	/**
     * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
     */
	@SideOnly(Side.CLIENT)
    public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
    {
        par3List.add(new ItemStack(par1, 1, 0));
        par3List.add(new ItemStack(par1, 1, 1));
        par3List.add(new ItemStack(par1, 1, 2));
        par3List.add(new ItemStack(par1, 1, 3));
    }
}
